<template>
<view class="address-item flexc">
	<image v-if="isDefault" class="bar" src="@/static/address_active_bar.png"></image>
	<image v-else class="bar" src="@/static/address_normal_bar.png"></image>
	<view class="address-content">
		<view class="name">
			<text class="text-color1 name-text">浪了</text>
			<text class="text-color2">121212121</text>
		</view>
		<view class="address">
			地址:  广东省 深圳市 宝安区 西乡街道华侨新村二巷10号1205房
		</view>
		<view class="flexr align-center text-color2">
			<view class="default flexr align-center" v-if="isDefault">
				<view class="default-icon">
					<image class="icon" src="@/static/gou.png"></image>
				</view>
				<text>默认</text>
			</view>
			<view class="flex-1"></view>
			<view class="flexr align-center">
				<image class="icon" src="@/static/edit.png"></image>
				<text>编辑</text>
			</view>
			<view class="flexr delete-btn align-center">
				<image class="icon" src="@/static/delete2.png"></image>
				<text>删除</text>
			</view>
		</view>
	</view>
</view>
</template>

<script setup>
defineProps({
	isDefault: Boolean,
})
</script>

<style lang="scss">
.address-item {
	// height: 320rpx;
	// min-height: 320rpx;
	border-radius: 15rpx;
	background-color: white;
	margin: 32rpx;
	margin-bottom: 0rpx;
	.bar {
		height: 12rpx;
		width: 100%;
	}
	.address-content {
		padding: 32rpx;
		.name {
			font-size: 32rpx;
			.name-text {
				margin-right: 15rpx;
			}
		}
		.address {
			font-size: 28rpx;
			color: $text-color5;
			margin-top: 20rpx;
			margin-bottom: 15rpx;
		}
		.icon {
			width: 28rpx;
			height: 28rpx;
			margin: 10rpx 15rpx 10rpx 0rpx;
		}
		.default-icon {
			width: 32rpx;
			height: 32rpx;
			background-color: $primary-color;
			border-radius: 100rpx;
			margin: 10rpx 15rpx 10rpx 0rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			.icon {
				width: 20rpx;
				height: 20rpx;
				margin: 0;
			}
		}
		.delete-btn {
			margin-left: 55rpx;
		}
	}
}
</style>